package com.hxh.entity.po;

import lombok.Data;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @ProjectName: AICode
 * @Package: com.example.entity.po
 * @ClassName: TableInfo
 * @Author: HXH
 * @Description: 数据表信息
 * @Date: 2023/12/11 9:56
 */
@Data
public class CreateTableSql implements ExplainByResultSet<CreateTableSql>{
    /**
     * 表名
     **/
    private String table;

    /**
     * 建表语句
     **/
    private String sql;


    @Override
    public CreateTableSql getOneByRs(ResultSet resultSet) throws SQLException {
        CreateTableSql createTableSql = this;
        createTableSql.setTable(resultSet.getString("Table"));
        createTableSql.setSql(resultSet.getString("Create Table"));
        return createTableSql;
    }
}

